package com.study.studyelasticsearch.util.es.extractor.vo;

/**
 * 聚合桶中的元素
 * @author 吴宇亮 on 2022/5/30 17:30
 */
public class BucketItemVo extends AbstractBucketItemVo {

    private long docCount;
    private BucketVo bucket;

    public BucketItemVo() {
    }

    public BucketItemVo(String key, long docCount) {
        this.setKey(key);
        this.docCount = docCount;
    }

    public long getDocCount() {
        return docCount;
    }

    public void setDocCount(long docCount) {
        this.docCount = docCount;
    }

    public BucketVo getBucket() {
        return bucket;
    }

    public void setBucket(BucketVo bucket) {
        this.bucket = bucket;
    }

    @Override
    public String toString() {
        return "BucketItemVo{" +
                "key=" + getKey() +
                "docCount=" + docCount +
                ", bucket=" + bucket +
                '}';
    }
}
